package cn.terminus.client.customer.custominfo.service;

import cn.terminus.client.customer.analysis.result.CustomerStageNumResult;
import cn.terminus.client.customer.analysis.result.CustomerNatureIndustryResultList;
import cn.terminus.client.customer.analysis.param.CustomerStageParam;
import cn.terminus.client.customer.custominfo.param.*;
import cn.terminus.client.customer.custominfo.result.ChannelCustomerNumberResult;
import cn.terminus.client.customer.custominfo.result.CustomInfoByNameResult;
import cn.terminus.client.customer.custominfo.result.CustomInfoResult;
import cn.terminus.client.customer.userrecordinfo.param.AddUserRecordInfoParam;
import cn.terminus.result.common.context.TerminusCallContext;
import cn.terminus.result.common.exception.ServiceException;
import cn.terminus.result.common.page.TerminusPageAble;
import cn.terminus.result.common.page.TerminusPageInfo;
import cn.terminus.result.common.result.TerminusResult;

import java.util.List;

/**
 * (CustomInfo)表服务接口
 *
 * @author makejava
 * @since 2021-07-08 11:18:50
 */
public interface CustomInfoService {

    /**
     * 新增
     *
     * @param param
     * @param context
     * @return
     * @throws ServiceException
     */
    TerminusResult<String> add(CustomInfoNewParam param, TerminusCallContext context) throws ServiceException;

    /**
     * 更新
     *
     * @param param
     * @param context
     * @return
     * @throws ServiceException
     */
    TerminusResult<Boolean> update(CustomInfoEditParam param, TerminusCallContext context) throws ServiceException;


    /**
     * 查询详情
     *
     * @param param
     * @param context
     * @return
     * @throws ServiceException
     */
    TerminusResult<CustomInfoResult> getDetail(CustomInfoGetsParam param, TerminusCallContext context) throws ServiceException;

    /**
     * 删除
     *
     * @param param
     * @param context
     * @return
     * @throws ServiceException
     */
    TerminusResult<Boolean> delete(CustomInfoDeleteParam param, TerminusCallContext context) throws ServiceException;


    /**
     * 分页查询
     *
     * @param param
     * @param page
     * @param context
     * @return
     * @throws ServiceException
     */
    TerminusResult<TerminusPageAble<CustomInfoResult>> page(CustomInfoQueryParam param, TerminusPageInfo page, TerminusCallContext context) throws ServiceException;

    /**
     * 新增客户
     *
     * @param param
     * @param context
     * @return
     * @throws ServiceException
     */
    TerminusResult<String> addDetail(AddCustomInfoParam param, TerminusCallContext context) throws ServiceException;


    /**
     * 新增客户跟进记录
     *
     * @param param
     * @param context
     * @return
     * @throws ServiceException
     */
    TerminusResult<String> addUserRecordInfo(AddUserRecordInfoParam param, TerminusCallContext context) throws ServiceException;


    TerminusResult<Boolean> belongTo(CustomBelongtoParam param, TerminusCallContext terminusContext) throws ServiceException;

    TerminusResult<List<CustomInfoByNameResult>> getNameListByName(GetNameListByNameParam param, TerminusCallContext terminusContext) throws ServiceException;

    TerminusResult<List<ChannelCustomerNumberResult>> getChannelCustomerNumber(CustomerChannelUserParam param, TerminusCallContext terminusContext) throws ServiceException;

    TerminusResult<List<CustomerStageNumResult>> analysisStage(CustomerStageParam param, TerminusCallContext terminusContext) throws ServiceException;

    TerminusResult<CustomerNatureIndustryResultList> analysisNatureAndIndustry(CustomerStageParam param, TerminusCallContext terminusContext) throws ServiceException;

    TerminusResult<List<ChannelCustomerNumberResult>> changeCustomerChannel(CustomerChannelUserParam param, TerminusCallContext terminusContext) throws ServiceException;
}
